package com.fsl.springcloudstream.messaging;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @author dell
 * 自定义sink input和output
 */
public interface SinkClient {

    String INPUT = "input";
    String OUTPUT = "output";

    /**
     * 输入通道
     * @return
     */
    @Input(SinkClient.INPUT)
    SubscribableChannel input();

    /**
     * 输出通道
     * MessageChannel在同一工程里面相同的@OutPut只能唯一
     * @return
     */
    @Output(SinkClient.OUTPUT)
    MessageChannel  output();

}
